<extend name="Public:base" />
<block name="title">食堂档口管理</block>
<block name="content">
    <div class=" ace-save-state" id="breadcrumbs">
        <div class="page-header">
            <h1>菜品管理
                <small><i class="ace-icon fa fa-angle-double-right"></i>菜品类别管理</small>
            </h1>
        </div>
        <!-- /.ace-settings-container -->
        <div class="page-content col-xs-11">
            
            <div class="row">
                <div class="col-xs-12">
                    <!-- PAGE CONTENT BEGINS -->
                    <div class="row">
                        <div class="col-xs-12">
                            <ul class="nav nav-tabs padding-12 tab-color-blue background-blue" id="myTab">
                                <li class="active">
                                    <a v="0" href="javascript:;" onclick="showType('all',this)" data-toggle="tab">所有类别</a>
                                </li>
                            </ul>
                            
                            <div>
                                <table class="table table-bordered table-hover">
                                    <thead>
                                    <tr>
                                        <th class="detail-col center">类别ID</th>
                                        <th class="center">类别名称</th>
                                        <th class="center">排序 <i style="color: dodgerblue" onclick="alert('序号越低排在越靠前')" class="fa fa-question-circle"></i></th>
                                        <th>
                                            <button type="button" class="btn btn-sm btn-danger" onclick="saveSort()">
                                                <span>保存排序</span>
                                            </button>
                                        </th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <form id="sortForm" class="form-inline" action="{:U('Admin/Item/saveClassSort')}" method="post" enctype="multipart/form-data">
                                        <?php foreach($itemTypeList as $k=>$l){?>
                                        <tr class="all" type="<?php echo $l['item_type'];?>">
                                            
                                            <td class="center"><?php echo $l['item_type_id'];?></td>
    
                                            <td class="center"><?php echo $l['item_type_name'];?></td>
                                            <td class="center" width="40px">
                                                <input type="text" name="sort[<?php echo $l['item_type_id'];?>]" value="<?php echo $l['item_type_sort'];?>">
                                            </td>
                                            <td>
                                            </td>
                                        </tr>
                                        <?php }?>
                                    </form>
                                    </tbody>
                                </table>
                            </div>
                        </div><!-- /.span -->
                    </div><!-- /.row -->
                    
                    
                    <!-- PAGE CONTENT ENDS -->
                </div><!-- /.col -->
            </div><!-- /.row -->
        </div>
    </div>


</block>
<block name="js">
    <script>
        function saveSort() {
            $('#sortForm').submit()
        }

        window.onload=function () {
        }
    </script>

</block>
